//
//  NetWorkController.h
//  betterlearning
//
//  Created by Leo.Wang on 15/6/10.
//  Copyright (c) 2015年 Leo.Wang. All rights reserved.
//网络请求类
#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@protocol NetWorkDelegate <NSObject>
@required
/** 调用API请求的成功回调 */
-(void)succes:(AFHTTPRequestOperation *)operation with:(id)responseObject;
/** 调用API请求的失败回调 */
-(void)failure:(AFHTTPRequestOperation *)operation with:(NSString *)errorDes;
@end

@interface NetWorkController : AFHTTPRequestOperationManager
/**
 *  单例方法
 *
 *  @return NetWorkController
 */
+(instancetype)instance;
/**
 *  网络请求
 *
 *  @param dict       字典
 *  @param arrayStaye 参数数组
 *  @param delegate   NetWork代理
 *  @param marks      标识
 */
- (void)startTheAFConnectionWithDict:(NSDictionary *)dict withArray:(NSArray *)arrayStaye with:(id<NetWorkDelegate>)delegate as:(NSDictionary *)marks;
@end
